﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master Resources/XLMaster.Master"
    AutoEventWireup="true" CodeBehind="EditOrder.aspx.cs" Inherits="XclusiveClient.EditOrder" %>

<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
        string ktr, mtr;
        for (int k = 0; k < 24; k++)
        {
            for (int m = 0; m < 60; m++)
            {
                if (k < 10)
                {
                    ktr = "0" + k.ToString();
                }
                else
                {
                    ktr = k.ToString();
                }
                if (m < 10)
                {
                    mtr = "0" + m.ToString();
                }
                else
                {
                    mtr = m.ToString();
                }
                ddlShipTime.Items.Add(new ListItem(ktr + ":" + mtr));
            }
        }
    }
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="Content" runat="server">
    <h1 style="text-align: center">
        Update An Order</h1>
    <table style="margin-left: 218px">
        <tr>
            <td style="text-align: right; padding-top: 18px">
                Order ID:
            </td>
            <td style="float: left; padding-top: 13px">
                <asp:TextBox ID="tbxOrderID" runat="server" Width="100px"></asp:TextBox>
            </td>
            <td style="float: left">
                <asp:Button ID="btnRetrieveById" runat="server" Text="Search" OnClick="btnRetrieveById_Click"
                    ValidationGroup="RetrieveOrderToUpdate" />
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td style="text-align: left">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Display="Dynamic"
                    ErrorMessage="*Order ID Is Required" ControlToValidate="tbxOrderID" ForeColor="Red"
                    ValidationGroup="RetrieveOrderToUpdate"></asp:RequiredFieldValidator>
            </td>
        </tr>
    </table>
    <div id="wrapper-v2" style="margin-left: 50px">
        <table style="width: 700px">
            <tr>
                <td style="text-align: right">
                    Order Status:
                </td>
                <td style="text-align: left">
                    <asp:RadioButtonList ID="rdbStatus" runat="server">
                        <asp:ListItem>Pending</asp:ListItem>
                        <asp:ListItem>Ready for Shipping</asp:ListItem>
                        <asp:ListItem>Completed</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr>
                <td style="text-align: right">
                    Order Ship Date:
                </td>
                <td style="text-align: left" rowspan="0">
                    <asp:TextBox ID="tbxShipDate" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td style="text-align: right">
                    Order Ship Time:
                </td>
                <td style="text-align: left">
                    <asp:DropDownList ID="ddlShipTime" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                </td>
            </tr>
            <tr>
                <td style="text-align: right">
                    Order Ship Type:
                </td>
                <td style="text-align: left">
                    <asp:DropDownList ID="ddlShipType" runat="server">
                        <asp:ListItem>Land</asp:ListItem>
                        <asp:ListItem>Sea</asp:ListItem>
                        <asp:ListItem>Air</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td style="text-align: right">
                    Destination Address:
                </td>
                <td style="text-align: left">
                    <asp:TextBox ID="tbxAddress" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td style="text-align: right">
                    Employee In-Charged of Delivery (ID):
                </td>
                <td style="text-align: left">
                    <asp:TextBox ID="tbxEmpID" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td style="text-align: right">
                    Inventory List ID:
                </td>
                <td style="text-align: left">
                    <asp:TextBox ID="tbxListID" runat="server"></asp:TextBox>
                </td>
            </tr>
        </table>
    </div>
    <div style="text-align: center">
        <asp:Label ID="LblResult" runat="server" ForeColor="Red"></asp:Label>
        <br />
        <asp:Button ID="btnUpdate" runat="server" Text="Update" OnClick="btnUpdate_Click"
            ValidationGroup="UpdateOrder" />
        <br />
        <br />
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" Display="Dynamic"
            ErrorMessage="*Order Ship Date Is Required" ControlToValidate="tbxShipDate" ForeColor="Red"
            ValidationGroup="UpdateOrder"></asp:RequiredFieldValidator>
        <br />
        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" Display="Dynamic"
            ErrorMessage="*Shipment Address Is Required" ControlToValidate="tbxAddress" ForeColor="Red"
            ValidationGroup="UpdateOrder"></asp:RequiredFieldValidator>
        <br />
        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" Display="Dynamic"
            ErrorMessage="*Employee ID Is Required" ControlToValidate="tbxEmpID" ForeColor="Red"
            ValidationGroup="UpdateOrder"></asp:RequiredFieldValidator>
        <br />
        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" Display="Dynamic"
            ErrorMessage="*Inventory List ID Is Required" ControlToValidate="tbxListID" ForeColor="Red"
            ValidationGroup="UpdateOrder"></asp:RequiredFieldValidator>
    </div>
    </div>
</asp:Content>
